#include<iostream>
#include<string>
using namespace std;
const int N = 1e5 + 10;
int mp[N];
int n;
int main()
{
    cin >> n;
    int x;
    for (int i = 1; i <= n; i++) {
        cin >> x;
        mp[x]++;
    }
    int ans = 0;
    int sum = 0;
    for (int i = 1; i <= 1e5; i++) {
        if (!mp[i] || mp[i] == 2) {
            continue;
        }
        else if (mp[i] == 1) {
            ans ^= 1;
        }
        else {
            sum++;
        }
    }
    if (ans && !sum) {
        cout << "NO" << endl;
    }
    else {
        cout << "YES" << endl;
    }
    return 0; 
}